<template>
    <Modal
        v-model="sendResModal"
        width= "746"
        class="col-2"
        class-name="no-border"
        :closable="false"
        :footer-hide="true"
    >
        <div slot="header">
            {{ titleName }}
            <Icon class="f-fr" type="ios-close" @click="closeModel"/>
        </div>
        <div class="clearfix">
            <div class="f-fl icon">
                <Icon v-if="sendSuccess" type="ios-checkmark-circle" />
                <Icon v-if="!sendSuccess" type="ios-close-circle" color="red" />
            </div>
            <div class="f-fl modal-content" style="width: 600px; height: 80px;">
                {{ responseMsg }}
            </div>
        </div>
    </Modal>
</template>

<script>
export default {
    name: 'SendResModal',
    data () {
        return {
            sendResModal: false,
            titleName: '',
            sendSuccess: '',
            responseMsg: ''
        }
    },

    methods: {
        init (data, obj) {
            this.sendSuccess = data.success
            this.responseMsg = data.msg
            this.sendResModal = true
            if (obj.functionCode === 9) {
                this.titleName = '发送舱单'
            }
            if (obj.functionCode === 5) {
                this.titleName = '提运单修改'
            }
        },

        closeModel () {
            this.sendResModal = false
        }
    }
}
</script>

<style scoped>

</style>
